In this paper, we present a framework for the semantics and the computationof aggregates in the context of logic programming. In our study, an aggregatecan be an arbitrary interpreted second order predicate or function. We defineextensions of the Kripke-Kleene, the well-founded and the stable semantics foraggregate programs. The semantics is based on the concept of a three-valuedimmediate consequence operator of an aggregate program. Such an operatorapproximates the standard two-valued immediate consequence operator of theprogram, and induces a unique Kripke-Kleene model, a unique well-founded modeland a collection of stable models. We study different ways of defining suchoperators and thus obtain a framework of semantics, offering differenttrade-offs between precision and tractability. In particular, we investigateconditions on the operator that guarantee that the computation of the threetypes of semantics remains on the same level as for logic programs withoutaggregates. Other results show that, in practice, even efficient three-valuedimmediate consequence operators which are very low in the precision hierarchy,still provide optimal precision.
展开▼